package com.dyna.controller;

import com.dyna.domain.resp.R;
import com.dyna.domain.resp.virtual.SelfVirtualLockerResp;
import com.dyna.service.VirtualLockerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description virtual
 * @author zcw
 * @date 2025-02-27
 */
@Api("千岛/寄存柜")
@RestController
@RequestMapping(value = "/virtual")
public class VirtualLockerController {

    private final VirtualLockerService virtualLockerService;

    @Autowired
    public VirtualLockerController(VirtualLockerService virtualLockerService) {
        this.virtualLockerService = virtualLockerService;
    }

    @ApiOperation("个人寄存柜")
    @RequestMapping("/list")
    public R<List<SelfVirtualLockerResp>> getList() {
        return R.data(virtualLockerService.getList());
    }

}